package com.bjsxt.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMenuMapper {
    //添加角色和菜单之间的关系
    @Insert("insert into t_role_menu values(#{param1},#{param2}")
    Integer insert(Integer rid,Integer mid);
    //查询指定角色下的菜单
    @Select("select rm.id from t_role_menu rm join t_menu m on rm.mid=m.mid  where rm.rid=#{param1} and status=1")
    List<Integer> selectMore(Integer rid);
    //删除指定角色菜单
    @Delete("delete  from   t_role_menu where rid=#{param1}")
    Integer  delete(Integer rid);

}
